<?php $this->load->view('header'); ?>

<div class="wrap-intro">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header logo-app">Đăng ký miễn phí</h1>
            </div>
            <div class="app-form col-lg-12 col-xs-12 col-sm-12">
                <form class="col-lg-6 col-lg-offset-3" id="form-signup" method="POST">
                    <?=form_token()?>
                    <div>
                        <input type="text" name="email" id="email" class="form-control" value="<?php echo set_value('email')?>"  placeholder='Email'>
                        <span><?php echo form_error('email')?></span>
                    </div>
                    <div>
                        <input type="text" name="username" id="username" value="<?php echo set_value('username')?>" class="form-control" placeholder='Username'>
                        <span><?php echo form_error('username')?></span></span>
                    </div>
                    <div>
                        <input type="password" name="password" id="password" value="<?php echo set_value('password')?>" class="form-control"  placeholder='Password'>
                        <span><?php echo form_error('password')?></span>
                    </div>
                    <div>
                        <input type="password" name="confirm-password" id="confirm-password" value="<?php echo set_value('confirm-password')?>" class="form-control" id="exampleInputEmail1" placeholder='Nhập lại password'>
                        <span><?php echo form_error('confirm-password')?></span>
                    </div>
                    <div>
                        <button type="submit" name="buyerConfirm" value="buyerConfirm" class="btn btn-primary btn-lg col-lg-offset-5 col-xs-offset-2">Tạo tài khoản</button>
                    </div>
                    <div>

                        <button type="button" class="btn btn-primary btn-lg btn-block btn-login-facebook">Đăng ký bằng facebook</button>
                    </div>
                </form>
            </div> <!-- app-form-login -->
        </div>

    </div>
    <!-- /.container -->
</div> <!-- wrap intro -->
<script>
       $(document).ready(function(){
            $("#form-signup").validate({
                rules:{
                    "email" : {
                        required : true,
                        email : true,
                        minlength:5,
                        maxlength:20
                    }
                },
                messages:{
                    "email" : {
                        'minlength' : 'Email tối thiểu 5 ký tự',
                        'maxlength' : 'Email tối đa 20 ký tự',
                        required : "Email bắt buộc",
                        email : "Đúng định dạng email"
                    }
                }

            });

       });

</script>



<?php $this->load->view('home/content'); ?>
<?php $this->load->view('footer'); ?>



		
